﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc.Ajax;
using System.Web.Routing;

namespace System.Web.Mvc.Ajax
{
    public class CustomAjaxOptions : AjaxOptions
    {
        public CustomAjaxOptions()
        {
            this.LoadingElementId = "loading";
            this.UpdateTargetId = "main";

            //--这里由jquery ajaxSetup来完成不合适
            this.OnBegin = "OnBegin";
            this.OnSuccess = "OnSuccess";
            this.OnFailure = "OnFailure";
            this.OnComplete = "OnComplete";
            //--这里由jquery ajaxSetup来完成不合适

            //AjaxOptions.HttpMethod default value is Post
            //this.HttpMethod = "Post";
        }
    }
}
